home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1413 < prev    next >
Encoding:
Text File  |  1996-08-06  |  878 b   |  36 lines

  1. Path: news.alphatech.com!usenet
  2. From: Nick Polyak <npolyak@alphatech.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Friend of a base class question
  5. Date: 10 Jan 1996 20:38:26 GMT
  6. Organization: ALPHATECH, Inc.
  7. Message-ID: <4d1842$sht@erebus.alphatech.com>
  8. NNTP-Posting-Host: erebus.alphatech.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.1N (X11; I; SunOS 4.1.3 sun4m)
  13. X-URL: news:comp.lang.c++
  14.  
  15. Hi
  16. I have a question. 
  17. I have a class template A inside which I declared another class template I, to
  18. be a friend to it:
  19. template <class V>
  20. class A{
  21. friend class I<V>
  22. ..
  23. };
  24.  
  25. Then I derive a class I1 from a particular instance of the class template
  26. I<Vector> and some other class K:
  27.  
  28. I1 : public I<Vector>, public K{
  29. ..
  30. };
  31. Why the functions of I1 do not have access to the protected members of
  32. A<Vector>
  33. Thank you
  34. Nick
  35.  
  36.